
#pragma once
// exit.h
#include <stdint.h>
#include "main.h"
#include "gd32f4xx.h"

#ifndef EXIT_H
#define EXIT_H

#define my_EXIT_BASE 0x40013C00 
#define reg(DISTANCE) (*(volatile uint32_t *)(my_EXIT_BASE + (DISTANCE)))
#define EXIT_ITEN reg(0x00U) // Interrupt Enable Register
#define EXIT_RTEN reg(0x04U) // Rising Trigger Enable Register
#define EXIT_FTEN reg(0x08U) // Falling Trigger Enable Register
#define EXIT_SWIER reg(0x0CU) // Software Interrupt Register
#define EXIT_PD reg(0x14U) // Pending Register

void exit6_init(void);


void EXTI5_9_IRQHandler(void);


void real_func(void);
#endif /* EXIT_H */
